Integrand size = 25, antiderivative size = 257 \[ \int (a+b \tan (e+f x))^m (c+d \tan (e+f x))^n \, dx=\frac {\operatorname {AppellF1}\left (1+m,-n,1,2+m,-\frac {d (a+b \tan (e+f x))}{b c-a d},\frac {a+b \tan (e+f x)}{a-i b}\right ) (a+b \tan (e+f x))^{1+m} (c+d \tan (e+f x))^n \left (\frac {b (c+d \tan (e+f x))}{b c-a d}\right )^{-n}}{2 (i a+b) f (1+m)}-\frac {\operatorname {AppellF1}\left (1+m,-n,1,2+m,-\frac {d (a+b \tan (e+f x))}{b c-a d},\frac {a+b \tan (e+f x)}{a+i b}\right ) (a+b \tan (e+f x))^{1+m} (c+d \tan (e+f x))^n \left (\frac {b (c+d \tan (e+f x))}{b c-a d}\right )^{-n}}{2 (i a-b) f (1+m)} \]
1/2*AppellF1(1+m,1,-n,2+m,(a+b*tan(f*x+e))/(a-I*b),-d*(a+b*tan(f*x+e))/(-a *d+b*c))*(a+b*tan(f*x+e))^(1+m)*(c+d*tan(f*x+e))^n/(I*a+b)/f/(1+m)/((b*(c+ d*tan(f*x+e))/(-a*d+b*c))^n)-1/2*AppellF1(1+m,1,-n,2+m,(a+b*tan(f*x+e))/(a +I*b),-d*(a+b*tan(f*x+e))/(-a*d+b*c))*(a+b*tan(f*x+e))^(1+m)*(c+d*tan(f*x+ e))^n/(I*a-b)/f/(1+m)/((b*(c+d*tan(f*x+e))/(-a*d+b*c))^n)
\[ \int (a+b \tan (e+f x))^m (c+d \tan (e+f x))^n \, dx=\int (a+b \tan (e+f x))^m (c+d \tan (e+f x))^n \, dx \]
Time = 0.47 (sec) , antiderivative size = 255, normalized size of antiderivative = 0.99, number of steps used = 5, number of rules used = 4, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.160, Rules used = {3042, 4058, 662, 2009}
Below are the steps used by Rubi to obtain the solution. The rule number used for the transformation is given above next to the arrow. The rules definitions used are listed below.
\(\displaystyle \int (a+b \tan (e+f x))^m (c+d \tan (e+f x))^n \, dx\) |
\(\Big \downarrow \) 3042 |
\(\displaystyle \int (a+b \tan (e+f x))^m (c+d \tan (e+f x))^ndx\) |
\(\Big \downarrow \) 4058 |
\(\displaystyle \frac {\int \frac {(a+b \tan (e+f x))^m (c+d \tan (e+f x))^n}{\tan ^2(e+f x)+1}d\tan (e+f x)}{f}\) |
\(\Big \downarrow \) 662 |
\(\displaystyle \frac {\int \left (\frac {i (c+d \tan (e+f x))^n (a+b \tan (e+f x))^m}{2 (i-\tan (e+f x))}+\frac {i (c+d \tan (e+f x))^n (a+b \tan (e+f x))^m}{2 (\tan (e+f x)+i)}\right )d\tan (e+f x)}{f}\) |
\(\Big \downarrow \) 2009 |
\(\displaystyle \frac {\frac {(a+b \tan (e+f x))^{m+1} (c+d \tan (e+f x))^n \left (\frac {b (c+d \tan (e+f x))}{b c-a d}\right )^{-n} \operatorname {AppellF1}\left (m+1,-n,1,m+2,-\frac {d (a+b \tan (e+f x))}{b c-a d},\frac {a+b \tan (e+f x)}{a-i b}\right )}{2 (m+1) (b+i a)}-\frac {(a+b \tan (e+f x))^{m+1} (c+d \tan (e+f x))^n \left (\frac {b (c+d \tan (e+f x))}{b c-a d}\right )^{-n} \operatorname {AppellF1}\left (m+1,-n,1,m+2,-\frac {d (a+b \tan (e+f x))}{b c-a d},\frac {a+b \tan (e+f x)}{a+i b}\right )}{2 (m+1) (-b+i a)}}{f}\) |
((AppellF1[1 + m, -n, 1, 2 + m, -((d*(a + b*Tan[e + f*x]))/(b*c - a*d)), ( a + b*Tan[e + f*x])/(a - I*b)]*(a + b*Tan[e + f*x])^(1 + m)*(c + d*Tan[e + f*x])^n)/(2*(I*a + b)*(1 + m)*((b*(c + d*Tan[e + f*x]))/(b*c - a*d))^n) - (AppellF1[1 + m, -n, 1, 2 + m, -((d*(a + b*Tan[e + f*x]))/(b*c - a*d)), ( a + b*Tan[e + f*x])/(a + I*b)]*(a + b*Tan[e + f*x])^(1 + m)*(c + d*Tan[e + f*x])^n)/(2*(I*a - b)*(1 + m)*((b*(c + d*Tan[e + f*x]))/(b*c - a*d))^n))/ f
3.14.4.3.1 Defintions of rubi rules used
Int[(((d_.) + (e_.)*(x_))^(m_)*((f_.) + (g_.)*(x_))^(n_))/((a_) + (c_.)*(x_ )^2), x_Symbol] :> Int[ExpandIntegrand[(d + e*x)^m*(f + g*x)^n, 1/(a + c*x^ 2), x], x] /; FreeQ[{a, c, d, e, f, g, m, n}, x] && !IntegerQ[m] && !Inte gerQ[n]
Int[((a_.) + (b_.)*tan[(e_.) + (f_.)*(x_)])^(m_)*((c_) + (d_.)*tan[(e_.) + (f_.)*(x_)])^(n_), x_Symbol] :> With[{ff = FreeFactors[Tan[e + f*x], x]}, S imp[ff/f Subst[Int[(a + b*ff*x)^m*((c + d*ff*x)^n/(1 + ff^2*x^2)), x], x, Tan[e + f*x]/ff], x]] /; FreeQ[{a, b, c, d, e, f, m, n}, x] && NeQ[b*c - a *d, 0] && NeQ[a^2 + b^2, 0] && NeQ[c^2 + d^2, 0]
\[\int \left (a +b \tan \left (f x +e \right )\right )^{m} \left (c +d \tan \left (f x +e \right )\right )^{n}d x\]
\[ \int (a+b \tan (e+f x))^m (c+d \tan (e+f x))^n \, dx=\int { {\left (b \tan \left (f x + e\right ) + a\right )}^{m} {\left (d \tan \left (f x + e\right ) + c\right )}^{n} \,d x } \]
Exception generated. \[ \int (a+b \tan (e+f x))^m (c+d \tan (e+f x))^n \, dx=\text {Exception raised: HeuristicGCDFailed} \]
\[ \int (a+b \tan (e+f x))^m (c+d \tan (e+f x))^n \, dx=\int { {\left (b \tan \left (f x + e\right ) + a\right )}^{m} {\left (d \tan \left (f x + e\right ) + c\right )}^{n} \,d x } \]
\[ \int (a+b \tan (e+f x))^m (c+d \tan (e+f x))^n \, dx=\int { {\left (b \tan \left (f x + e\right ) + a\right )}^{m} {\left (d \tan \left (f x + e\right ) + c\right )}^{n} \,d x } \]
Timed out. \[ \int (a+b \tan (e+f x))^m (c+d \tan (e+f x))^n \, dx=\int {\left (a+b\,\mathrm {tan}\left (e+f\,x\right )\right )}^m\,{\left (c+d\,\mathrm {tan}\left (e+f\,x\right )\right )}^n \,d x \]